<?php
/**
 * This file is part from Vis-Testing
 * 
 *
 * @package models
 * @author Ivan I. Atanasov <i.atanasov@viscomp.bg>
 */

/**
 * Base Model Class for Web Dev Projets
 * 
 * @author Ivan I. Atanasov <i.atanasov@viscomp.bg>
 */
class Model_Base_Project extends Doctrine_Record {
    
    public function setTableDefinition()
    {
        $this->setTableName('projects');
        
        $this->hasColumn('id', 'integer', 4, array(
            'type' => 'integer',
            'unsigned' => true,
            'primary' => true,
            'notnull'  => true,
            'autoincrement' => true,
        ));
        
        $this->hasColumn('title', 'string', 100);

    }
	//======================================================================================================
    
    public function setUp()
    {
        $this->hasMany('Model_TestCase as testcases', array(
                'local' => 'id',
                'foreign' => 'projects_id'
            )
        );
    }
    //======================================================================================================
    
    
}